const { DataTypes } = require('sequelize');
const sequelize = require('../connect'); // Adjust the path as necessary

const Shelve = sequelize.define('Shelve', {
    id: {
        type: DataTypes.INTEGER,
        autoIncrement: true,
        primaryKey: true
    },
    name: {
        type: DataTypes.STRING,
        allowNull: false
    },
    recordedAt: {
        type: DataTypes.DATE,
        allowNull: false,
        defaultValue: DataTypes.NOW
    }
}, {
    tableName: 'shelves',
    timestamps: false
});


console.log("==> The table for the Shelve model was just (re)created!");
module.exports = Shelve;